import { RouteRecordRaw } from 'vue-router'

export const asyncRoutes: Array<RouteRecordRaw> = [
  {
    path: '/dashboard',
    name: 'dashboard',
    component: () => import('../views/Home/Index.vue'),
    meta: {
      title: 'dashboard',
      icon: '&#xe61f;'
    }
  },
  {
    path: '/permissTest',
    name: 'permissTest',
    component: () => import('../views/PermissTest/Index.vue'),
    meta: {
      title: 'permissTest',
      icon: '&#xe61a;'
    }
  },
  {
    path: '/directiveTest',
    name: 'directiveTest',
    component: () => import('../views/DirectiveTest/Index.vue'),
    meta: {
      title: 'directiveTest',
      icon: '&#xe626;'
    }
  },
  {
    path: '/notice',
    name: 'notice',
    component: () => import('../views/Notice/Index.vue'),
    meta: {
      title: 'notice',
      icon: '&#xe6bd;',
      role: 'admin'
    }
  },
  {
    path: '/icons',
    name: 'icons',
    component: () => import('../views/Icons/Index.vue'),
    meta: {
      title: 'icons',
      icon: '&#xe696;'
    }
  },
  {
    path: '/editor',
    name: 'editor',
    component: () => import('../views/Editor/Index.vue'),
    meta: {
      title: 'editor',
      icon: '&#xe643;',
      role: 'admin'
    }
  },
  {
    path: '/table',
    name: 'table',
    meta: {
      title: 'table',
      icon: '&#xe6c4;'
    },
    children: [
      {
        path: '/adminTable',
        name: 'adminTable',
        component: () => import('../views/Table/AdminTable.vue'),
        meta: {
          title: 'adminTable',
          icon: '&#xe663;',
          role: 'admin'
        }
      },
      {
        path: '/userTable',
        name: 'userTable',
        component: () => import('../views/Table/UserTable.vue'),
        meta: {
          title: 'userTable',
          icon: '&#xe66a;'
        }
      }
    ]
  },
  {
    path: '/todoList',
    name: 'todoList',
    component: () => import('../views/TodoList/Index.vue'),
    meta: {
      title: 'todoList',
      icon: '&#xe6f5;',
      role: 'admin'
    }
  },
  {
    path: '/Area',
    name: 'Area',
    component: () => import('../views/Area/Index.vue'),
    meta: {
      title: 'Area',
      icon: '&#xe703;'
    }
  },
  {
    path: '/ffmpeg',
    name: 'ffmpeg',
    component: () => import('../views/ffmpeg/Video.vue'),
    meta: {
      title: 'ffmpeg',
      icon: '&#xe703;'
    }
  }
]
